POV-Ray : Newsgroups : povray.advanced-users : How to return multiple values from a macro? : How to return multiple values from a macro? Server Time
6 Oct 2024 13:53:05 EDT (-0400)
  How to return multiple values from a macro?  
From: Jos leys
Date: 3 Sep 2006 17:35:00
Message: <web.44fb4a6b3c2bacd6f4015f620@news.povray.org>
As an example, take the simple case where I have two values A and B, and I
need their sum and their product. Is there a way to do this with one macro?
(my actual problem is a lot more complex,(rotation in four dimensions) but
the principle is the same..)

#macro sum_product(A,B)
  #local sum=A+B
  #local product=A*B
.......?
#end

// now how do I read sum and product?
Is this at all possible?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.